package com.ruoyi.retailer.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 物流管理信息
 * @TableName trace_transport
 */
@TableName(value ="trace_transport")
@Data
public class TraceTransport implements Serializable {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 作物编号
     */
    private String cropsId;

    /**
     * 司机账号
     */
    private String driverId;

    /**
     * 时间
     */
    private Date time;

    /**
     * 农户昵称
     */
    private String farmerNickName;

    /**
     * 农户账号
     */
    private String farmerUserName;

    /**
     * 农户电话
     */
    private String farmerTel;

    /**
     * 所属部门名称
     */
    private String farmerDept;

    /**
     * 工厂ID
     */
    private Integer factoryId;

    /**
     * 运输状态（0，未运输，1，正在运输，2，运输完成）
     */
    private Integer status;

    /**
     * 0已入库 1已出库
     */
    private Integer outFactoryStatus;

    /**
     * 零售商签收状态
     */
    private Integer retailerReceiveStatus;

    /**
     * 备注
     */
    private String remarks;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TraceTransport other = (TraceTransport) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCropsId() == null ? other.getCropsId() == null : this.getCropsId().equals(other.getCropsId()))
            && (this.getDriverId() == null ? other.getDriverId() == null : this.getDriverId().equals(other.getDriverId()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
            && (this.getFarmerNickName() == null ? other.getFarmerNickName() == null : this.getFarmerNickName().equals(other.getFarmerNickName()))
            && (this.getFarmerUserName() == null ? other.getFarmerUserName() == null : this.getFarmerUserName().equals(other.getFarmerUserName()))
            && (this.getFarmerTel() == null ? other.getFarmerTel() == null : this.getFarmerTel().equals(other.getFarmerTel()))
            && (this.getFarmerDept() == null ? other.getFarmerDept() == null : this.getFarmerDept().equals(other.getFarmerDept()))
            && (this.getFactoryId() == null ? other.getFactoryId() == null : this.getFactoryId().equals(other.getFactoryId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getOutFactoryStatus() == null ? other.getOutFactoryStatus() == null : this.getOutFactoryStatus().equals(other.getOutFactoryStatus()))
            && (this.getRetailerReceiveStatus() == null ? other.getRetailerReceiveStatus() == null : this.getRetailerReceiveStatus().equals(other.getRetailerReceiveStatus()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCropsId() == null) ? 0 : getCropsId().hashCode());
        result = prime * result + ((getDriverId() == null) ? 0 : getDriverId().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        result = prime * result + ((getFarmerNickName() == null) ? 0 : getFarmerNickName().hashCode());
        result = prime * result + ((getFarmerUserName() == null) ? 0 : getFarmerUserName().hashCode());
        result = prime * result + ((getFarmerTel() == null) ? 0 : getFarmerTel().hashCode());
        result = prime * result + ((getFarmerDept() == null) ? 0 : getFarmerDept().hashCode());
        result = prime * result + ((getFactoryId() == null) ? 0 : getFactoryId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getOutFactoryStatus() == null) ? 0 : getOutFactoryStatus().hashCode());
        result = prime * result + ((getRetailerReceiveStatus() == null) ? 0 : getRetailerReceiveStatus().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", cropsId=").append(cropsId);
        sb.append(", driverId=").append(driverId);
        sb.append(", time=").append(time);
        sb.append(", farmerNickName=").append(farmerNickName);
        sb.append(", farmerUserName=").append(farmerUserName);
        sb.append(", farmerTel=").append(farmerTel);
        sb.append(", farmerDept=").append(farmerDept);
        sb.append(", factoryId=").append(factoryId);
        sb.append(", status=").append(status);
        sb.append(", outFactoryStatus=").append(outFactoryStatus);
        sb.append(", retailerReceiveStatus=").append(retailerReceiveStatus);
        sb.append(", remarks=").append(remarks);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}